﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace CRS.Web.BaseData
{
    public partial class PayBill : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Expires = -1;
            if (!IsPostBack)
            {
                RoomName.Text = Request.QueryString["RoomName"];
                GridView1.DataSource = BindList();
                GridView1.DataBind();
            }
        }

        public DataTable BindList()
        {
            var result = new DataTable();
            result.Columns.Add("类别", typeof(string)); //产品名称
            result.Columns.Add("金额", typeof(string)); //单位


            //给该列填值
            DataRow dr = result.NewRow();
            dr["类别"] = "零食";
            dr["金额"] = "10";
            result.Rows.Add(dr);


            DataRow dr1 = result.NewRow();
            dr1["类别"] = "烟洒";
            dr1["金额"] = "100";
            result.Rows.Add(dr1);

            DataRow dr2 = result.NewRow();
            dr2["类别"] = "饮料";
            dr2["金额"] = "100";
            result.Rows.Add(dr2);

            DataRow dr3 = result.NewRow();
            dr3["类别"] = "包厢费";
            dr3["金额"] = "30每小时*5小时=150";
            result.Rows.Add(dr3);

            DataRow dr4 = result.NewRow();
            dr4["类别"] = "其它";
            dr4["金额"] = "80";
            result.Rows.Add(dr4);

            return result;
        }

        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}
